-- GENERATED SPELL FOR [Cultist Shard Watcher] --


function spell0_32349(pUnit, Event) --@Shadow Bolt Volley,Self--
pUnit:FullCastSpellOnTarget(39175,pUnit)
pUnit:RegisterEvent('Sorts_32349', 2000, 1)
end

function spell1_32349(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(34441,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32349', 18000, 1)
end

function spell2_32349(pUnit, Event) --@Unstable Affliction,n/a--
pUnit:FullCastSpellOnTarget(34439,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32349', 18000, 1)
end

function Sorts_32349(pUnit, Event)
local choix_sorts_32349 = math.random(0, 2)
if choix_sorts_32349 == 0 then
pUnit:RegisterEvent('spell0_32349', 1, 1)
end
if choix_sorts_32349 == 1 then
pUnit:RegisterEvent('spell1_32349', 1, 1)
end
if choix_sorts_32349 == 2 then
pUnit:RegisterEvent('spell2_32349', 1, 1)
end
end

function mob32349_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32349', math.random(1500, 3000), 1)
end

function mob32349_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32349_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32349_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32349, 1, 'mob32349_Action')
RegisterUnitEvent(32349, 2, 'mob32349_Leave')
RegisterUnitEvent(32349, 3, 'mob32349_Kill')
RegisterUnitEvent(32349, 4, 'mob32349_Die')
